<navbar></navbar>
<style type="text/css">
	.container {
		margin-top: 60px
	}

	td th {
		text-align: center;
	}
</style>

<title>Info</title>
<div class="container">
	<h1 align="center">Merchant Info</h1>
	</br>
	<table class="table table-hover" style="width: 30%; margin: 0 auto;">
		<thead>
		<tr>
			<th>Info</th>
			<th>Info</th>
		</tr>

		</thead>

		<tbody>
		<tr>
			<td>Name</td>
			<td id="td1">{{vm.merchant.name}}</td>
		</tr>
		<tr>
			<td>StoreName</td>
			<td id="td2">{{vm.merchant.storeName}}</td>
		</tr>

		<tr>
			<td>Address</td>
			<td id="td3">{{vm.merchant.address}}</td>
		</tr>

		<!--<tr id="tr-reason" style="display:none;">-->
			<!--<td>Reason</td>-->
			<!--<td id="reason"></td>-->
		<!--</tr>-->
		</tbody>
	</table>
	</br>
	<div style="margin: 0 auto; text-align: center;">
		<img class="img-circle" ng-src="{{vm.merchant.img}}" width="100px" height="100px" />
	</div>
	<br />
	<div class="text-center" ng-show="vm.merchant.state!=1">
		<button id="openUpdate"  class="btn btn-success col-md-offset-3" ng-click="vm.openModal()">Update</button>
	</div>
	<!--<div ng-include="updateModal.html"></div>-->
</div>
<!--<script src='../../../js/bootstrap-3.3.7.min.js'></script>-->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"
	 aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">Update Merchant Info
				</h4>
			</div>
			<div class="modal-body">
				<form id="updateForm">
					<div class="form-group">
						<label for="name">Name</label> <input type="text"
															  class="form-control" name="name" ng-model="vm.merchant.name" disabled="disabled"
															  placeholder="please input name">
					</div>

					<input name="_id" type="text"  style="display:none"  ng-model="vm.merchant._id">
					<div class="form-group">
						<label for="name">Address</label> <input type="text"
																 class="form-control" name="address" ng-model="vm.merchant.address"
																 placeholder="please input address">
					</div>
					<div class="form-group">
						<label for="name">StoreName</label> <input 	type="text"
																   class="form-control" name="storeName" ng-model="vm.merchant.storeName"
																   placeholder="please input storename">
					</div>
					<div class="form-group">
						<label for="name">Idcard</label> <input type="file"
																class="form-control" name="idcard" id="updateIacard">
					</div>
					<div class="form-group">
						<label for="name">Store Image</label> <input type="file"
																	 class="form-control" name="img" id="updateImg">
					</div>

				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Close
				</button>
				<button type="button" class="btn btn-primary" ng-click="vm.update()" id="modalBtn">Update</button>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal -->
</div>